<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
		<style type="text/css">
			body {
				height: 2000px;
				margin: 0;
				padding: 0;
			}
			
			#div {
				margin: 100px;
				width: 100px;
				height: 100px;
				background: gray;
			}
		</style>
	</head>

	<body>
		<div id="div">click</div>
	</body>
	<script type="text/javascript">
		// 获取点击时间的event IE和chrome下有window.event,火狐没有window.event
		// 获取事件的clientX-视口的坐标,pageX-视口的鼠标坐标,screenX-相对屏幕左上角的鼠标坐标
		document.getElementById('div').onclick = function(ev) {
			ev = window.event || ev;
			console.log('client',ev.clientX, ev.clientY);
			console.log('page',ev.pageX,ev.pageY);
			console.log('screen',ev.screenX,ev.screenY);
		}
	</script>
</html>